<template>
	<view>
		<view v-for="(item,index) in list" :key="index">
			<view @click="itemClick(item)" class="item">
				<view class="flex-row-space-between" style="padding: 0 30rpx;height: 76rpx;">
					<view class="no">
						{{item.ctime}}
					</view>
					<view class="state">
						<text v-if="Number(item.status)==1||Number(item.status)==4||Number(item.status)==5||Number(item.status)==6">成功</text>
						<text v-if="Number(item.status)==2">审批失败</text>
						<text v-if="Number(item.status)==3">审核中</text>
					</view>
				</view>
				<view class="line">
					
				</view>
				<view class="flex-row-space-between" style="padding: 0 30rpx;height: 136rpx;">
					<view class="">
						<view class="price">
						{{item.price}}
						</view>
						<view class="priceTitle">
							提现金额(元)
						</view>
					</view>
					<view class="detailButton flex-column-center">
						查看详情
					</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapActions,
		mapState
	} from "vuex";
	import {
		orderList,
	} from '@/api/index.js'
	export default {
		components: {},
		computed: {

		},
		data() {
			return {
				list:[],
				data:{}

			}
		},
		computed: {
			...mapState([
				'baseColor'
			]),
		},
		onShow() {
	
		},
		onLoad(e) {
			this.loadData()
		},
		//下拉刷新
		onPullDownRefresh() {


		},
		//加载更多
		onReachBottom() {

		},
		onPageScroll(e) {
			// if (e.scrollTop > 20) {
			// 	this.backgroundColor = "#FBF9FF"
			// } else {
			// 	this.backgroundColor = "#ffffff00"
			// }
		},
		methods: {
			itemClick(item){
				uni.navigateTo({
					url:'withdrawalDetail?id='+item.id
				})
			},
			loadData () {
			
				var data = {
				type:1,
				}
				orderList(data).then(res => {
					this.list=res.data
				})
			},
			
			showToast(title) {
				uni.showToast({
					title: title,
					icon: 'none'
				})
			},
			toUrl(url) {
				uni.navigateTo({
					url: url
				})
			},
		}
	}
</script>

<style lang="scss">

.item{
	margin: 20rpx 30rpx;
	// height: 212rpx;
	background: #FFFFFF;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
}
.no{
	font-family: PingFang SC, PingFang SC;
	font-weight: 400;
	font-size: 28rpx;
	color: #666666;
}
.state{
	font-family: PingFang SC, PingFang SC;
	font-weight: 400;
	font-size: 28rpx;
	color: #EC554F;
}
.line{
	// width: 690rpx;
	height: 2rpx;
	background: #F6F6F6;
}
.detailButton{
	width: 132rpx;
	height: 48rpx;
	background: #FFFFFF;
	border-radius: 24rpx 24rpx 24rpx 24rpx;
	border: 1rpx solid #999999;
	font-family: PingFang SC, PingFang SC;
	font-weight: 400;
	font-size: 24rpx;
	color: #666666;
}
.priceTitle{
	margin-top: 6rpx;
	font-family: PingFang SC, PingFang SC;
	font-weight: 400;
	font-size: 24rpx;
	color: #666666;
}
</style>